Javascript is very flexible with regards to checking for "null" values. I'm guessing you're actually looking for empty strings, in which case this simpler code will work:

if(!pass || !cpass || !email || !cemail || !user){

Which will check for empty strings (""), null, undefined, false and the numbers 0 and NaN

Please note that if you are specifically checking for numbers it is a common mistake to miss 0 with this method, and num !== 0 is preferred (or num !== -1 or ~num (hacky code that also checks against -1)) for functions that return -1, e.g. indexOf)

How do I check for null values in JavaScript? - Stack Overflow

https://stackoverflow.com/questions/6003884/how-do-i-check-for-null-values-in-javascript

null acts as a number and object at the same time. Comparing null >= 0 or null <= 0 results in true . Comparing null === 0 or null > ...

JavaScript typeof

https://www.w3schools.com/js/js_typeof.asp

There are 6 types of objects: Object; Date; Array; String; Number; Boolean. And 2 data types that cannot contain values: null; undefined ...

JavaScript null and undefined

https://www.programiz.com/javascript/null-undefined

In JavaScript, null is a special value that represents an empty or unknown value. For example, let number = null;. The code above suggests that the number ...

JavaScript typeof, null, 和undefined | 菜鸟教程

http://www.runoob.com/js/js-typeof.html

JavaScript typeof, null, 和undefined typeof 操作符你可以使用typeof 操作符来检测变量的数据类型。 实例typeof 'John' &..